<?php
$str=array(
    'name'=>'zhangsan'
);
$str= json_encode($str);


function test($checkContent=''){
    error_reporting(0);
    $type=gettype($checkContent);
    if($type=='string'){
        echo 1;
        $is_json=is_json($checkContent);
        if($is_json){
            WordFilterController::getCheckContentSting($checkContent);

        }else{
              WordFilterController::getCheckContentSting($checkContent);
        }
    }
    if($type=='array'){
        WordFilterController::getCheckContentArray($checkContent);
    }

}
function is_json($string) {
    json_decode($string);
    return (json_last_error() == JSON_ERROR_NONE);
}

